﻿@model LY.Manage.Model.RoleInfo

@{
    Layout = null;
}


<!DOCTYPE html>

<head>
    <meta name="viewport" content="width=device-width" />

    <title>修改用户</title>
    <!--引入文件-->
    <link href="~/Content/themes/default/easyui.css" rel="stylesheet" />
    <link href="~/Content/themes/icon.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-1.8.2.min.js"></script>
    <script src="~/Scripts/jquery.easyui.min.js"></script>
    <script src="~/Scripts/easyui-lang-zh_CN.js"></script>
    <script src="~/Scripts/datapattern.js"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <link href="~/Content/BaseStyle.css" rel="stylesheet" />

    <script type="text/javascript">
        //获取url中的参数
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
            if (r != null) return unescape(r[2]); return null; //返回参数值
        }
        $(function () {
            console.log(getUrlParam("id"));
            $('#id').val(getUrlParam("id"));
        });

        function subForm() {
            console.log("subForm--submit");
            $("#fmMain").submit();
        }
        function afterEdit(data) {
            console.log("sub-after-add:" + data);
            //调用父窗体中的方法
            window.parent.afterEdit(data);
        }
    </script>
</head>
<body>

    @using (Ajax.BeginForm("EditUserInfo", "RoleInfo", new { }, new AjaxOptions()
{
    HttpMethod = "post",
    OnSuccess = "afterEdit"
}, new { id = "fmMain" }))
    {
        @Html.AntiForgeryToken()
        @Html.ValidationSummary(true)
        <input type="hidden" id="id" name="id" />
          @Html.HiddenFor(model => model.ID)
          @Html.HiddenFor(model => model.SubTime)
          @Html.HiddenFor(model => model.DelFlag)
         <table>
                <tr><td>角色名称：</td><td>@Html.EditorFor(model => model.RoleName)</td></tr>                
                <tr><td>备注：</td><td>@Html.EditorFor(model => model.Remark)</td></tr>
                <tr><td>排序：</td><td>@Html.EditorFor(model => model.Sort)</td></tr>
            </table>


    }

  
</body>

